from gradio import Interface
from gradio.components import Textbox
import requests

def process_qa_gen(text):
    response = requests.post("http://localhost:8001/process_qa_gen", json={"text": text})
    return response.json()["text"]



input_textbox = Textbox(lines=5)
output_textbox = Textbox(lines=5)


iface = Interface(fn=process_qa_gen, inputs=input_textbox, outputs=output_textbox)
iface.launch(share=False, server_name='0.0.0.0',server_port=8000)

